<template>
	<div class="ion-view" id="personal">
		<ion-header></ion-header>
		<ion-content class="has-header has-tabs">
			<button v-on:click="addAtLast()">点我</button>

			<div>
				{{msg}}
			</div>
			<div>
				<my-component></my-component>
			</div>

		</ion-content>
		<ion-tabs></ion-tabs>
	</div>
</template>

<script>
	import myComponent from '../../modules/test' //这里引入
	import {mapGetters} from 'vuex'
	import store from '../../vuex/store';
	
	export default {
		name: 'personal',
		vuex: {
		    state: {
		      count: state => state.count
		    }
		},
		components: {
			myComponent
		}, //这里注册
		methods: {
			removeTodo: function() {
				this.items.splice(index, 1)
			},
			addAtLast: function() {
				alert("是否打开模态框", 1).done(function(data) {
					if(data == 'ok') {
						store.dispatch('changeCount', 9)
					}
				});
			},
			deleteAtTop: function() {
				this.items.shift();
			},
			deleteAtBottom: function() {
				this.items.pop();
			},
			incrementTotalee: function(type) {
				console.log(type)
			},
		},
		data() {
			return {
				msg: 'Welcome to Your Vue.js App',
				menu_s: false
			}
		}
	}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>